import json

dict1 = {"name": "zhangsan", "type": "male"}

print(json.dumps(dict1))